import api from './index'
import tools from '@/tools'
import config from "@/config"

export const getOrgList = () => {
	const url = `${config.pre}/supplier/org/list`
	return api.post(url, {})
}

export const getOrgPoint = (orgId) => {
	const url = `${config.pre}/supplier/price/point/org?orgId=${orgId}`
	return api.get(url)
}

export const userList = (params) => {
	const url = `${config.pre}/supplier/org/user/list`
	return api.post(url, params)
}

export const cateTree = () => {
	const url = `${config.pre}/supplier/category/tree`
	return api.get(url)
}

export const pointList = (params) => {
	const url = `${config.pre}/supplier/price/point/list`
	return api.post(url, params)
}

export const pointSetConfig = (params) => {
	const url = `${config.pre}/supplier/price/config/type`
	return api.post(url, params)
}

export const pointOrgUse = (orgId) => {
	const url = `${config.pre}/supplier/price/point/orgUse?orgId=${orgId}`
	return api.get(url)
}

export const configUse = (params) => {
	const url = `${config.pre}/supplier/price/config`
	return api.post(url, params)
}

export const orgPrice = (priceId, orgId) => {
	const url = `${config.pre}/supplier/price/org/${priceId}?orgId=${orgId}`
	return api.get(url)
}